/**
 * 
 */
package com.gragra.util.tests;

import static org.junit.Assert.*;
import org.junit.Test;
import com.gragra.util.ReplaceWithSelf;

/**
 * @author Christoph Teichmann
 * created Oct 28, 2012 8:43:29 PM
 * @version 0.1
 */
public class TestReplaceWithSelf
{
	/**
	 * Test method for {@link com.gragra.util.ReplaceWithSelf#apply(java.lang.String)}.
	 */
	@Test
	public void testApplyString()
	{
		ReplaceWithSelf rws = new ReplaceWithSelf(",.ab");
		String s = "that, was a very big house.";
		assertEquals("th a t ,  w a s  a  very  b ig house .",rws.apply(s));
		rws = new ReplaceWithSelf(" ");
		assertEquals("that,   was   a   very   big   house.",rws.apply(s));
	}
}
